<template>
	<view>
		<u-popup v-model="show" mode="bottom" border-radius="20" @close="popupClose">
			<view class="label u-p-30">
				<view class="u-m-t-30 u-m-b-30" v-for="labelItem in list" :key="labelItem.id" @click="onChooseLabel(labelItem)">
					<button class="shareBtn">{{ labelItem.name }}</button>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default{
		props: ['list','popupShow'],
		data(){
			return{
				show: this.popupShow
			}
		},
		watch:{
		    popupShow: {
		    	deep: true,
		    	handler(val) {
		    		this.show = val
		    	}
		    }
		},
		methods:{
			onChooseLabel(val){
				this.$emit("onChooseLabel",val)
			},
			popupClose(){
				this.$emit("popupClose")
			}
		}
	}
</script>

<style lang="scss" scoped>	
	.shareBtn {
		background: #B3723E;
		color: #FFF;
		width: 100%;
	}
	
	button {
		border-radius: 20rpx !important;
		border: none !important;
		height: 85rpx !important;
		line-height: 85rpx !important;
		font-size: 30rpx !important;
	}
	
	button::after{
		border: none !important;
	}
</style>